package com.ai.javaailangchain4j.assistant;


import dev.langchain4j.service.MemoryId;
import dev.langchain4j.service.SystemMessage;
import dev.langchain4j.service.UserMessage;
import dev.langchain4j.service.V;
import dev.langchain4j.service.spring.AiService;

import static dev.langchain4j.service.spring.AiServiceWiringMode.EXPLICIT;

@AiService(
        wiringMode = EXPLICIT,
        chatModel = "qwenChatModel",
        chatMemoryProvider = "chatMemoryProvider",
        tools = "calculatorTools")
public interface SeparateChatAssistant {
    /**
     * 分离聊天记录
     *
     * @param memoryId    记录ID
     * @param userMessage 用户消息
     * @return 响应
     */
//    @SystemMessage("你是我的好朋友，请用广东话回答问题")
//    @SystemMessage("你是我的好朋友，请用东北话回答问题，当前日期{{current_date}}")
    @SystemMessage(fromResource = "my-prompt.txt")
    String chat(@MemoryId int memoryId, @UserMessage String userMessage);

    @SystemMessage(fromResource = "my-prompt1.txt")
    String chat1(
            @MemoryId int memoryId,
            @UserMessage String userMessage,
            @V("username") String username,
            @V("age") int age
    );
}
